<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

<script>


    function Cat(name, col, callback) {
        this.name = name
        this.col = col
        this.say = function () { console.log('我要抓Jerry') }
        this.callback = callback || function () { console.log('我一定会回来的') }
    }

    var Tom = new Cat('Tom', 'blue', function () { '我是一只🐱,快乐的星🐱' })
    console.log(Tom, Tom instanceof Cat)

</script>

</html>